<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>小王收入计算</title>
</head>
<body>
    <!-- 小王入职薪水10k,每年涨幅5%，10年后小王的月薪为多少，总收入为多少？ -->
</body>
<script>
    (function () {
        var wage = 10000;
        var total = wage * 12;

        
        for (var i = 1; i <= 3; i++) {
            total = total + total * 0.05 * (i - 1);
            if (i == 1) wage = wage;       
            else wage = wage  + wage * 0.05;
        }

        console.log('10年后总收入' + total + '元');
        console.log('10年后月薪' + wage + '元');











    })();
</script>
</html>